<template>
	<view>
		<view class="content">
			<van-collapse v-model="activeNames" v-for="item,index in listData" class="SC" :key="index">
			  <van-collapse-item :title="item.test_name" :name="index" >
					<text class="score">多选题成绩：{{item.selection_score}}分</text>
					<text class="score">单选题成绩：{{item.single_score}}分</text>
					<text class="score">判断题成绩：{{item.judge_score}}分</text>
					<text class="score">总成绩：{{item.sum_score}}分</text>
				</van-collapse-item>
			</van-collapse>
		</view>
	</view>
</template>

<script>
	import { getStudentAppScore} from '@/api/user'
	export default {
		data() {
			return {
				listData:null,
				activeNames:[]
			}
		},
		created() {
			this.getListData()
		},
		methods: {
			getListData(){
				getStudentAppScore({student_id:this.$store.getters.student_id}).then(res=>{
					this.listData=res.data.data
				})
			},
			onClickLeft(){
				uni.switchTab({
					url: "../home/index"
				})
			}
		}
	}
</script>

<style>
	.content {padding: 20rpx;}
	.SC{margin-bottom: 20rpx;}
	.score{display: block;}
</style>
